package text;


import java.util.Map;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lankystar.sos.model.User;
import com.lankystar.sos.model.UserApprove;
import com.lankystar.sos.model.UserType;
import com.lankystar.sos.service.IUserInterface;

public class UserTest {

	ApplicationContext atx = null;
	IUserInterface userInterface = null;
	@Before
	public void inti(){
		atx = new ClassPathXmlApplicationContext("applicationContext.xml");
		userInterface =  (IUserInterface) atx.getBean("userServiceImpl");
	}
	@Test
	public void retusnUserMessage() {
		Map<String, Object> map = userInterface.resultUserMessageMethod(1);
		User user = (User) map.get("user");
		UserType userType = (UserType) map.get("userType");
		UserApprove userApprove = (UserApprove) map.get("userApprove");
		System.out.println(user);
		System.out.println(userType);
		System.out.println(userApprove);
	}
}
